<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style>
section {
    width: 20px;
    height: 20px;
    border: 2px solid;
}
.foo + section + section + section {
    background-color: red;
}
.bar + section + section + section {
    background-color: green;
}
</style>

<section class="foo"></section>
<section></section>
<section></section>
<section id="last"></section>

<script>
document.documentElement.offsetTop;
document.querySelector('.foo').className = 'bar';
document.documentElement.offsetTop;
shouldBe("getComputedStyle(document.getElementById('last')).backgroundColor", "'rgb(0, 128, 0)'");
</script>
